<template>
  <div class="home">
    <el-input v-model="input" placeholder="请输入内容"></el-input>
    <el-button type="primary" @click="test">主要按钮</el-button>

  </div>
</template>

<script>

export default {
  name: 'home',
  data() {
    return {
      input: ''
    }
  },
  methods:{
    test(){
      chrome.storage.local.set({"test":"test"},function(){
          chrome.tabs.query({active: true, currentWindow: false}, function(tabs)
          {
              console.log(tabs);
              chrome.tabs.sendMessage(tabs[0].id, {}, function(response){});
          });
      })
    },
  }
}
</script>
